﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RolePlayingGame
{
    public abstract class MapObject : IRenderable, ICollidable
    {
        public Coord Location { get; set; }
        public char Symbol { get; set; }
        public bool Exists { get; set; }

        public MapObject(Coord startLocation, char symbol)
        {
            this.Location = startLocation;
            this.Symbol = symbol;
        }

        public virtual void Move(Coord movement) 
        {
            this.Location += movement;
        }

        public void Disapear()
        {
            this.Exists = false; //this does not free the memory
        }

        public Coord GetLocation()
        {
            return this.Location;
        }

        public char GetSymbol()
        {
            return this.Symbol;
        }



        public virtual void CollideWith(ICollidable other)
        {
            
        }
    }
}
